<p id="notice"><%= notice %></p>

<h2>Your Cart</h2>
<table>
	<% @cart.line_items.each do |item| %>
		<tr>
			<td><%= item.quantity %>&times;</td>
			<td><%= item.product.title %></td>
			<td class="item_price"><%= number_to_currency(item.total_price) %></td>
		</tr>
	<% end %>
		<tr class="total_line">
			<td colspan="2">Total</td>
			<td class="total_cell"><%= number_to_currency(@cart.total_price) %></td>
		</tr>
</table>

<%= button_to 'Empty cart', @cart, method: :delete, data: {confirm: 'Are you sure?'} %>
<%= link_to 'Edit', edit_cart_path(@cart) %> |
<%= link_to 'Back', carts_path %>
